<?php
class FrontEndController extends Controller
{
	/**
	 * @var string the default layout for the controller view. Defaults to '//layouts/column1',
	 * meaning using a single column layout. See 'protected/views/layouts/column1.php'.
	 */
	public $layout='//layouts/column1';
	/**
	 * @var array the breadcrumbs of the current page. The value of this property will
	 * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
	 * for more details on how to specify this property.
	 */
	public $breadcrumbs=array();
	
	/**
	 * Returns menu item for specified menu depth
	 * @param integer $depth
	 */
	public function getMenu($parentId=null, $depth=0){
		return array(
			'items'=>array(
				array('label'=>'Index', 'url'=>array('/page/index',
					'page'=>Page::model()->findByPk(Yii::app()->settings->get('page', 'indexPageId'))->name)),
			),
		);
	}
}